Various cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
void __init print_IO_APIC(void)
{
-#ifndef NDEBUG
int apic, i;
union IO_APIC_reg_00 reg_00;
union IO_APIC_reg_01 reg_01;
}
printk(KERN_INFO ".................................... done.\n");
-#endif /* !NDEBUG */
+
return;
}
.end = end_lapic_irq
};
-#if 0
-static void setup_nmi (void)
-{
- /*
- * Dirty trick to enable the NMI watchdog ...
- * We put the 8259A master into AEOI mode and
- * unmask on all local APICs LVT0 as NMI.
- *
- * The idea to use the 8259A in AEOI mode ('8259A Virtual Wire')
- * is from Maciej W. Rozycki - so we do not have to EOI from
- * the NMI handler or the timer interrupt.
- */
- apic_printk(APIC_VERBOSE, KERN_INFO "activating NMI Watchdog ...");
-
- on_each_cpu(enable_NMI_through_LVT0, NULL, 1, 1);
-
- apic_printk(APIC_VERBOSE, " done.\n");
-}
-#endif
-
/*
* This looks a bit hackish but it's about the only one way of sending
* a few INTA cycles to 8259As and any associated glue logic. ICR does
*/
unmask_IO_APIC_irq(0);
if (timer_irq_works()) {
-#if 0
- if (nmi_watchdog == NMI_IO_APIC) {
- disable_8259A_irq(0);
- setup_nmi();
- enable_8259A_irq(0);
- check_nmi_watchdog();
- }
-#endif
return;
}
clear_IO_APIC_pin(0, pin1);
replace_pin_at_irq(0, 0, pin1, 0, pin2);
else
add_pin_to_irq(0, 0, pin2);
-#if 0
- if (nmi_watchdog == NMI_IO_APIC) {
- setup_nmi();
- check_nmi_watchdog();
- }
-#endif
return;
}
/*
#include <xen/config.h>
#include <xen/init.h>
#include <xen/pci.h>
+#include <xen/slab.h>
#include <xen/smp.h>
#include <xen/spinlock.h>
#include <asm/mtrr.h>
if ( trapnr == TRAP_page_fault )
{
__asm__ __volatile__ ("mov %%cr2,%0" : "=r" (cr2) : );
- printk("Faulting linear address might be %p\n", _p(cr2));
+ printk("Faulting linear address: %p\n", _p(cr2));
+ show_page_walk(cr2);
}
printk("************************************\n");
show_page_walk(addr);
panic("CPU%d FATAL PAGE FAULT\n"
"[error_code=%04x]\n"
- "Faulting linear address might be %p\n",
+ "Faulting linear address: %p\n",
smp_processor_id(), regs->error_code, addr);
return 0;
}
OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
BLANK();
- DEFINE(FIXMAP_apic_base, __fix_to_virt(FIX_APIC_BASE));
+ DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
BLANK();
DEFINE(IRQSTAT_shift, LOG_2(sizeof(irq_cpustat_t)));
{
if ( unlikely(idx >= __end_of_fixed_addresses) )
BUG();
- map_pages(idle_pg_table, __fix_to_virt(idx), p, PAGE_SIZE, flags);
+ map_pages(idle_pg_table, fix_to_virt(idx), p, PAGE_SIZE, flags);
}
{
if ( unlikely(idx >= __end_of_fixed_addresses) )
BUG();
- map_pages(idle_pg_table, __fix_to_virt(idx), p, PAGE_SIZE, flags);
+ map_pages(idle_pg_table, fix_to_virt(idx), p, PAGE_SIZE, flags);
}
#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
-extern void __this_fixmap_does_not_exist(void);
-
-/*
- * 'index to address' translation. If anyone tries to use the idx
- * directly without translation, we catch the bug with a NULL-deference
- * kernel oops. Illegal ranges of incoming indices are caught too.
- */
-static always_inline unsigned long fix_to_virt(const unsigned int idx)
-{
- /*
- * This branch gets completely eliminated after inlining, except when
- * someone tries to use fixaddr indices in an illegal way (such as mixing
- * up address types or using out-of-range indices).
- *
- * If it doesn't get removed, the linker will complain loudly with a
- * reasonably clear error message.
- */
- if (idx >= __end_of_fixed_addresses)
- __this_fixmap_does_not_exist();
-
- return __fix_to_virt(idx);
-}
+#define fix_to_virt(x) (__fix_to_virt(x))
static inline unsigned long virt_to_fix(const unsigned long vaddr)
{